/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.qdu.servlet;
import com.qdu.entity.Note;
import com.qdu.service.NoteService;
import com.qdu.service.impl.NoteServiceImpl;





import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

//查看个人发布的日志
@WebServlet("/hhh")
public class GetNoteByNnoServlet extends HttpServlet {

     NoteService pp = new NoteServiceImpl();

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {


        int Nno = Integer.parseInt(req.getParameter("Nno"));


       Note note = pp.findNoteByNno(Nno);

        req.setAttribute("note", note);
        req.getRequestDispatcher("/Note_Info.jsp").forward(req, resp);
    }
}
